{% extends "learn_django/base.html" %}
{% load staticfiles %}

{% block content %}
    <div class="content-wrapper">
        <section class="content">
            <div class="row">
                <div class="col-xs-12">
                    <div class="box box-info">
                        <div class="box-header with-border">
                            <h3 class="box-title">用户详情 ({{ user.username }}) </h3>
                            {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
                        </div>
                        <form class="form-horizontal" action="" method="post">
                            {% csrf_token %}
                            <div class="box-body">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">用户名</label>
                                    <div class="col-sm-5">
                                        <input type="text" class="form-control" id="username" placeholder="用户名" value="{{ user.username }}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="inputEmail3" class="col-sm-2 control-label">邮箱</label>
                                    <div class="col-sm-5">
                                        <input type="email" class="form-control" id="inputEmail3" placeholder="邮箱" value="{{ user.email }}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">是否启用</label>
                                    <div class="col-sm-5">
                                        <input type="checkbox" {% if user.is_active %} checked {% endif %} />
                                    </div>
                                </div>
                            </div>
                            <div class="box-footer">
                                <button type="submit" class="btn btn-success pull-right">提交</button>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </section>
    </div>
{% endblock %}